// bigbanner
var mySwiper = new Swiper('#bannerbig', {
    autoplay: {
        delay: 1500,
        disableOnInteraction: false,
    },//可选选项，自动滑动
    effect: 'fade',
    loop: true,
    speed: 2000,
    pagination: {
        el: '.swiper-pagination',
        clickable: true,
    },
})
var mySwiper1 = new Swiper('#bannerm', {
    autoplay: {
        delay: 2500,
        disableOnInteraction: false,
    },//可选选项，自动滑动
    effect : 'fade',
    loop: true,
    speed: 800,
    pagination: {
        el: '.swiper-pagination',
        clickable: true,
    },
});
// 横向滑屏
function transverse(id){
    myswiper = new Swiper(id, {
        slidesPerView: 4.5,
        spaceBetween: 12,
        freeMode: true,
        pagination: {
          el: '.swiper-pagination',
          clickable: true,
        },
      })
}
transverse('#edit');
transverse('#newbook');
transverse('#clicklist');
transverse('#chaselist');
transverse('#newlist');
transverse('#hotlist');

// 排行榜tab
var index = 0;
var tablist = $(".banglist").find(".sw");
var tabclick = $(".clicktab").find("p");
tablist.hide();
tablist.eq(0).show();
// // tabclick.bind("tap",function(){
// //     console.log($(this).index())
// // })
tabclick.click(function(){
    index = $(this).index();
    $(this).siblings("p").removeClass("active")
    $(this).addClass("active")
    tablist.hide();
    tablist.eq(index).show();
})